package controller;

import java.io.FileNotFoundException;
import java.net.URISyntaxException;

import lexerPackage.BaseLexer;
import lexerPackage.IToken;
import lexerPackage.TokenClassEnum;
import lexerPackage.TokenStream;

public class AlignmentControl {

	IAligner aligner;
	TokenStream tokenStream1 = new TokenStream();
	TokenStream tokenStream2 = new TokenStream();
	// IAlignmentMatrix alignmentMatrix = new SimpleAlignmentMatrix();
	Presenter presenter;
	BaseLexer lexer;
	BaseLexer lexer2;

	ISelector selector;

	public AlignmentControl(ISelector selector, IAligner aligner, Presenter presenter) throws FileNotFoundException, URISyntaxException {
		this.selector = selector;
		this.aligner = aligner;
		this.presenter = presenter;
		this.lexer = presenter.lexer;

		while (true) {
			IToken tk = lexer.getToken();
			if (tk.getClassCode() != TokenClassEnum.EOF)
				tokenStream1.tokenStream.add(tk);

			else {
				break;
			}

			while (true) {
				IToken tk2 = lexer2.getToken();
				if (tk2.getClassCode() != TokenClassEnum.EOF)
					tokenStream2.tokenStream.add(tk);

				else
					break;
			}

		}

	}
}
